package com.jk.mapper;

import com.jk.entity.Company;
import com.jk.entity.Message;
import com.jk.entity.Register;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

/**
 * @author 荣楠楠
 * 创建时间：2018/4/11 22:15
 * @Description: TODO
 */
public interface LoginMapper {

 /* *
  * @Description: 个人登录查询
  * @author rnn
  * @date 2018/4/12 23:19
  * @param [registerName]
  * @return com.jk.entity.Register
  */
    @Select("select * from t_register where registerName =#{registerName}")
    Register queryregister(String registerName);

    /* *
     * @Description: 个人注册新增
     * @author rnn
     * @date 2018/4/12 23:20
     * @param [register]
     * @return void
     */
    @Insert("insert into t_register (registerId,registerName,registerPass) VALUES(#{registerId},#{registerName},#{registerPass})")
    void saveRegister(Register register);

    /* *
     * @Description:企业登录查询
     * @author rnn
     * @date 2018/4/12 23:20
     * @param [companyPersonPhone]
     * @return com.jk.entity.Company
     */
    @Select("select * from i_company where companyPersonPhone =#{companyPersonPhone}")
    Company queryCompanyPersonPhone(String companyPersonPhone);

  /* *
   * @Description:企业登录时验证手机号是否存在
   * @author rnn
   * @date 2018/4/16 18:59
   * @param [companyPersonPhone]
   * @return com.jk.entity.Company
   */
   @Select("select * from i_company where companyPersonPhone =#{companyPersonPhone}")
   Company queryCompany(String companyPersonPhone);

   /* *
    * @Description:企业注册时  新增是id，手机号，上传图片
    * @author rnn
    * @date 2018/4/16 18:59
    * @param [company]
    * @return void
    */
   @Insert("insert into i_company (companyId,companyPersonPhone,companyPhoto) VALUES(#{companyId},#{companyPersonPhone},#{companyPhoto})")
   void saveCompany(Company company);


}
